﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html>
<%@ Reference Control="~/Views/CustomControls/AnswerUserControl.ascx" %>

<script runat="server">

       protected void Button1_Click(object sender, EventArgs e)
    {
        this.Panel1.Controls.Add(new UncleBobApplicantWebService.Views.CustomControls.AnswerUserControl());
    }

    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (RadioButtonList1.SelectedValue == "Multiple Choice Question")
        {
            this.Panel1.Visible = true;
        }
        else
        {
            this.Panel1.Visible = false;
        }
    }
</script>


<html>
<head runat="server">
    <meta name="viewport" content="width=device-width" />
    <title>Create New Question</title>        
    <link href="/Theme/UncleBobTheme.css" rel="Stylesheet" />
    <style type="text/css">
        .style1
        {
            text-align: left;
        }
        #form1
        {
            text-align: left;
        }
    </style>
  </head>
</head>
<body class = "body">
    <form id="form1" runat="server">
    <div>        
        <asp:Label ID="Label1" runat="server" style="text-align: left" 
            Text="Create Question"></asp:Label>        
    </div>
    <p class="style1">
        Select the type of question:
        <br />
    &nbsp;<asp:RadioButtonList ID="RadioButtonList1" runat="server" 
            onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
            AutoPostBack="True">
            <asp:ListItem>Multiple Choice Question</asp:ListItem>
            <asp:ListItem>Extended Question</asp:ListItem>
        </asp:RadioButtonList>
    </p>
    <p class="style1">
    Please enter your question:
    </p>

    <asp:TextBox ID="TextBox1" runat="server" Height="102px" 
        style="text-align: left" TextMode="MultiLine" Width="773px"></asp:TextBox>
    <asp:Panel ID="Panel1" runat="server" Height="243px">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button1" runat="server" 
    Text="Add Answer" onclick="Button1_Click" />
        <p />
    </asp:Panel>
    </form>
</body>
</html>
